package P032_StaticVariablesMustDeclaredFirst;

import org.junit.Test;

/**
 * @ClassName : StaticVariablesMustDeclaredFirst
 * @Description : 静态变量一定要先声明后赋值
 * @Author : wukj1
 * @Date: 2022/3/7 18:16
 **/
public class StaticVariablesMustDeclaredFirst {

//    public static int i = 1;

    static{
        i = 100;
    }

    public static int i = 1;

    @Test
    public void test(){
        System.out.println("i的值为：" + i);
    }

}
